package score.utils;
import com.sun.sql.rowset.CachedRowSetXImpl;
import java.sql.SQLException;
/*
 * ModiRows.java
 *
 * Created on 14 de noviembre de 2007, 10:37
 *
 * To change this template, choose Tools | Options and locate the template under
 * the Source Creation and Management node. Right-click the template and choose
 * Open. You can then make changes to the template in the Source Editor.
 */

/**
 *
 * @author vramirez
 */
public class ModiRows {
    
    /** Creates a new instance of ModiRows */
    public ModiRows() {
    }
    
    public static void agregarEspacioLast(CachedRowSetXImpl crs,Object show, Object value)throws SQLException{        
            crs.execute();
            crs.afterLast();
            crs.moveToInsertRow();
            crs.updateObject(1,show);
            crs.updateObject(2,value);
            crs.insertRow();
            crs.moveToCurrentRow();
    }
    
    public static void agregarEspacioFirst(CachedRowSetXImpl crs,Object show, Object value)throws SQLException{        
            crs.execute();
            crs.beforeFirst();
            crs.moveToInsertRow();
            crs.updateObject(1,show);
            crs.updateObject(2,value);
            crs.insertRow();
            crs.moveToCurrentRow();
    }
}
